<!DOCTYPE html>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<base href="<%=basePath%>">
<title>完善个人信息</title>
<link type="text/css" rel="stylesheet" href="include/css/main.css" />
<link type="text/css" rel="stylesheet" href="include/css/personal.css" />
<script type="text/javascript" src="include/script/jquery.js" ></script>
<script type="text/javascript" src="include/script/main_ui_control.js"></script>
<script type="text/javascript">
function check_form(){
	var b = true;
	$("input[type!='button'],select,textarea").each(function(){
		if(this.name!="phone"&&this.value==""||this.value==null)b=false;
		return b;
	});
	if(!b)$("input[name='submit_btn']").attr("disabled","disabled");
	else $("input[name='submit_btn']").attr("disabled","");
}

window.onload = function(){
	//绘制菜单背景，需要html5支持
	drawBG();
	//菜单动画
	//menu_animation();
	//菜单事件绑定
	
	//表单验证
	check_form();
	$("input[type!='button'],select,textarea").keyup(check_form);
}
</script>
</head>

<body>

	<s:action name="getTeacherRequest"></s:action>
  	<s:set name="teacher" value="#request.tch"/>
  	
<div class="content">
	<div class="account_info">
    	<img src="pic/photo.jpg" class="user_photo" />
        <ul>
        	<li><span><s:property value="#teacher.name"/></span><span><s:property value="#teacher.sex"/></span></li>
            <li><s:property value="#teacher.email"/>@whu.edu.cn</li>
        </ul>
    </div>
    <hr class="line" />
    <div class="details">
    <s:form theme="simple" action="editInfoAction!saveTeacherInfo" method="post">
    	<h>基本资料</h>
    	<ul>
    		<li><strong>*</strong><span>姓名:</span>
           <s:textfield  name="teacher.name"></s:textfield>
            </li>
            <li><strong>*</strong><span>性别:</span>
           	<s:radio label="性别" list="{'男','女'}" name="teacher.sex" value="'男'"></s:radio>
  			 </li>
        	<li><strong>*</strong><span>学院:</span>
           <s:textfield  name="teacher.faculty" ></s:textfield>
            </li>
           <li><strong>&nbsp;</strong><span>电话：</span><s:textfield  label="电话" name="teacher.phone" ></s:textfield>
   		   </li>
            <li><strong>*</strong><span>邮件：</span><s:textfield  label="邮箱" name="teacher.regularEmail"  ></s:textfield>
   			</li>
        </ul>
        <h>研究相关</h>
        <ul>
		    <li><strong>*</strong><span>研究方向：</span><br />
            	<s:textarea   name="teacher.field " ></s:textarea>
            </li>
        	<li><strong>*</strong><span>实验地点：</span><br />
            	<s:textarea  name="teacher.lab " ></s:textarea>
            </li>
        	<li><strong>*</strong><span>科研成果：</span><br />
            	<s:textarea  name="teacher.achievement" ></s:textarea>
            </li>

        </ul>
         <input type="submit" value="保存修改" name="submit_btn" /><input type="reset" value="取消" />
    </s:form>
    </div>
    
</div>
<!-- 
<div id="_bottom_menu">
    <ul id="bottom_menu_left">
        <li id="menu_item_personlainfo">个人资料</li>
        <li id="menu_item_mysubjects">我的课题</li>
        <li id="menu_item_interaction">师生互动</li>
    </ul>
    <ul id="bottom_menu_right">
        <li id="menu_item_personla">个人中心</li>
        <li id="menu_item_project">科研课题</li>
        <li id="menu_item_search">查找</li>
        <li id="menu_item_others">其他</li>
    </ul>
    <canvas id="bg_canvas_left"></canvas>
    <canvas id="bg_canvas_right"></canvas>
</div>
 -->
<script language="javascript">

</script>
</body>
</html>
